# -G "Visual Studio 9 2008"
# First: cd in bulids/type/ (eg: cd builds/arm3730/
# Then, use the below command
#build with arm3730:  cmake ../.. -DCMAKE_TOOLCHAIN_FILE=../../arm_make.cmake -DCMAKE_BUILD_TYPE=Release
#build with vs2013 :  cmake ../.. -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 12 2013"
#build with vs2008 :  cmake ../.. -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 9 2008"
#bjam --toolset=msvc-9.0 --build-type=complete link=static threading=multi runtime-link=static --with-thread
# http://blog.csdn.net/jwybobo2007/article/details/7242307
# ./b2 link=static threading=multi runtime-link=static --with-thread
# CMAKE_BUILD_PLATFORM=HISI
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(tunnel_proxy)

INCLUDE(cmake/global_environment_settings.cmake)
# This Include Will setting 
# include path
# include library path
# link library
IF(WIN32)
	IF(MSVC12)
		INCLUDE(cmake/win_vs2013_environment_settings.cmake)
	ENDIF()
ELSEIF(UNIX)
	IF(CMAKE_BUILD_PLATFORM MATCHES ARM3730)
		INCLUDE(cmake/arm3730_environment_settings.cmake)
	ELSEIF(CMAKE_BUILD_PLATFORM MATCHES HISI)
		INCLUDE(cmake/hisi_environment_settings.cmake)
	ELSEIF(CMAKE_BUILD_PLATFORM MATCHES ARM6446)
		INCLUDE(cmake/arm6446_environment_settings.cmake)
	ENDIF()
ENDIF()

INCLUDE_DIRECTORIES(${VZPROJECT_INCLUDE_DIR})
LINK_DIRECTORIES(${VZPROJECT_LIBRARY_DIR})

include_regular_expression("^([^p]|p[^r]|pr[^e]|pre[^c]|prec[^o]|preco[^m]|precom[^p])")

ADD_SUBDIRECTORY(src/lib/vzconn)
ADD_SUBDIRECTORY(src/lib/vzbase)
ADD_SUBDIRECTORY(src/lib/sqlite3)
ADD_SUBDIRECTORY(src/lib/kvdb)
ADD_SUBDIRECTORY(src/lib/remote)

ADD_SUBDIRECTORY(src/run/remote_server)
ADD_SUBDIRECTORY(src/run/remote_client)
ADD_SUBDIRECTORY(src/run/web_server)

ADD_SUBDIRECTORY(cmake)